<?php
declare (strict_types=1);

namespace app\callback\controller;

use app\BaseController;
use app\Request;
use think\response\Json;

/**
 * EMQX平台
 */
class Emqx extends BaseController
{

    /**
     * EMQX认证回调
     * @param Request $request
     * @return Json
     */
    public function emqxMqttAuth(Request $request): Json
    {
        $post_data = $request->param();
        //实例化Emqx
        $Emqx = new \emqx\Emqx();
        return $Emqx->emqxMqttAuth($post_data);
    }

    /**
     * EMQX权限回调
     * @param Request $request
     * @return Json
     */
    public function emqxMqttAcl(Request $request): Json
    {
        $post_data = $request->param();
        //实例化Emqx
        $Emqx = new \emqx\Emqx();
        return $Emqx->emqxMqttAcl($post_data);
    }


}
